<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<div class="grid_24">
	<div class="grid_5">
		<a href="home" title="#"><img height="120" width="200"
			src="jsp/user/images/logo-small.jpg" alt="#" /></a>
	</div>
	<c:choose>
		<c:when test="${ empty sessionScope.user }">
			<div class="grid_18 login-med">
				<form action="home" method="post" class="login-box-med">
					<input type="text" value="email" name="email"
						onblur="if (this.value == '') {this.value = 'email';}"
						onfocus="if (this.value == 'email') {this.value = '';}" /> <input
						type="password" value="password" name="password"
						onblur="if (this.value == '') {this.value = 'password';}"
						onfocus="if (this.value == 'password') {this.value = '';}" /> <input
						type="submit" value="" name="login"><a href="#">Forgot
						your password?</a> &nbsp;<a href="register">Sign Up</a>
				</form>
			</div>
			<c:choose>
				<c:when test="${ empty loginError }">

				</c:when>
				<c:otherwise>
					<c:out value="${loginError}"></c:out>
				</c:otherwise>
			</c:choose>
		</c:when>
		<c:otherwise>
			<div class="grid_18 login-med">
				<h1>
					Welcome
					<c:out value="${sessionScope.user.name}" />
				</h1>
				<hr>
				&nbsp;<a href="home?action=logout">Logout</a>
			</div>
		</c:otherwise>
	</c:choose>

	<div class="grid_18 search-med">
		<form action="search" class="search-box-med" method="post">
			<label> <input type="text" value="search for..."
				name="search"
				onblur="if (this.value == '') {this.value = 'search for...';}"
				onfocus="if (this.value == 'search for...') {this.value = '';}" />
				<button type="submit" name="add">
					<span> </span>
				</button>
			</label>
		</form>
	</div>
</div>

<div class="grid_24 menutab">
	<ul>
		<li><a href="home" title="Home">HOME</a></li>
		<c:if test="${not empty user }">
			<li><a href="yellow-pages" title="Yellow Pages">YELLOW PAGES</a></li>
			<li><a href="create-project" title="Create Project">Create
					Project</a></li>
			<li><a href="user?who=me" title="My Page">MY PAGE</a></li>
		</c:if>
		<li><a href="inspiring" title="Inspring Stories">INSPIRING
				STORIES</a></li>
		<li><a href="help" title="Help">HELP</a></li>
	</ul>
</div>
<!-- HEADER FINISH -->

<div class="clear height20"></div>